
#ifndef __CE_PROJECTOR_H__
#define __CE_PROJECTOR_H__

#include <cegfx/ceexport.h>
#include <cecore/iqf.h>
#include <cegfx/iviewport.h>
#include <d3dx9.h>


class CE_GFX_API ceProjector : public iBase
{
	IQF_DECLARATION;
private:
	float		l;
	float		r;
	float		b;
	float		t;
	float		n;
	float		f;
	
	const iViewport* viewport;

	D3DXMATRIX	matrix;

	void UpdateMatrix ();

public:

	ceProjector (const iViewport* viewport = 0);

	void SetViewport (const iViewport* viewport);
	const iViewport* GetViewport () const;

	void SetNear (float n);
	float GetNear () const;
	void SetFar (float f);
	float GetFar () const;

	void SetLeft (float l);
	float GetLeft () const;

	void SetRight (float r);
	float GetRight () const;

	void SetBottom (float b);
	float GetBottom () const;

	void SetTop (float t);
	float GetTop () const;

	void Update (float angle);
	const D3DXMATRIX& GetMatrix () const;
};



#endif /* ! __CE_PROJECTOR_H__ */ 
